# Main Makefile for Kevins stupid "libsmtp" library
# Copyright (C) 2001 Kevin Read.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

SHELL = /bin/sh
top_srcdir = ..
srcdir = .


.SUFFIXES:
.SUFFIXES: .c .o

OPT=-g -O

AR = ar
AR_FLAGS = rc
RANLIB = ranlib

CC = gcc
CFLAGS = -I. -I../include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -g -O2 -DUSE_MIME
LDFLAGS = -L. -L../smtp -L/usr/local/lib
LIBS = -lsmtp -lsmtp_mime -lglib -lglib 
INSTALL = /usr/bin/install -c
prefix = /usr/local
exec_prefix = ${prefix}
bindir = $(exec_prefix)/bin
libdir = $(prefix)/lib
infodir = $(prefix)/info

SOURCES=
DOCS=
MISC=configure mkinstalldirs install-sh aclocal.m4
OBJS=
LIB_OBJS=base64.o comm.o parts.o quoted.o

all: libsmtp_mime.a

# ??? here I make the bindir, libdir and infodir directories; you
# might not need all of these.  also, I assumed the names PROG and
# libMYPROG.a for the program and library.
install: all
	$(top_srcdir)/mkinstalldirs $(libdir)
	$(INSTALL) libsmtp_mime.a $(libdir)/libsmtp_mime.a

uninstall:
	/bin/rm -f $(libdir)/libsmtp_mime.a

libsmtp_mime.a: $(LIB_OBJS)
	/bin/rm -f libsmtp_mime.a
	$(AR) $(AR_FLAGS) libsmtp_mime.a $(LIB_OBJS)
	$(RANLIB) libsmtp_mime.a

clean:
	/bin/rm -f core *.o $(OBJS) $(LIB_OBJS) libsmtp_mime.a

distclean: clean
	/bin/rm -f Makefile config.h config.status config.cache config.log

mostlyclean: clean

maintainer-clean: clean

# automatic re-running of configure if the ocnfigure.in file has changed
#${srcdir}/configure: configure.in aclocal.m4
#	cd ${srcdir} &#38;&#38; autoconf

## autoheader might not change config.h.in, so touch a stamp file
#${srcdir}/config.h.in: stamp-h.in
#${srcdir}/stamp-h.in: configure.in aclocal.m4
#		cd ${srcdir} &#38;&#38; autoheader
#		echo timestamp &#62; ${srcdir}/stamp-h.in

#config.h: stamp-h
#stamp-h: config.h.in config.status
#	./config.status
#Makefile: Makefile.in config.status
#	./config.status
#config.status: configure
#	./config.status --recheck
